load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("build_infra")

rust_library(
    name = "buck2_file_watcher",
    srcs = glob(["src/**/*.rs"]),
    named_deps = {
        # @oss-disable[end= ]: "edenfs": "//eden/fs/service:thrift-rust",
    },
    test_deps = [
        "fbsource//third-party/rust:tempfile",
    ],
    test_os_deps = [
        (
            "linux",
            [
                "fbsource//third-party/rust:assert_matches",
                "//buck2/app/buck2_util:buck2_util",
                "//buck2/gazebo/gazebo:gazebo",
            ],
        ),
        (
            "macos",
            [
                "fbsource//third-party/rust:assert_matches",
                "//buck2/app/buck2_util:buck2_util",
                "//buck2/gazebo/gazebo:gazebo",
            ],
        ),
    ],
    deps = [
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:blake3",
        "fbsource//third-party/rust:compact_str",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:hex",
        "fbsource//third-party/rust:notify",
        "fbsource//third-party/rust:serde",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tracing",
        "fbsource//third-party/rust:uuid",
        "//buck2/allocative/allocative:allocative",
        "//buck2/app/buck2_certs:buck2_certs",
        "//buck2/app/buck2_common:buck2_common",
        "//buck2/app/buck2_core:buck2_core",
        "//buck2/app/buck2_data:buck2_data",
        "//buck2/app/buck2_eden:buck2_eden",
        "//buck2/app/buck2_error:buck2_error",
        "//buck2/app/buck2_events:buck2_events",
        "//buck2/app/buck2_fs:buck2_fs",
        "//buck2/app/buck2_util:buck2_util",
        "//buck2/dice/dice:dice",
        "//buck2/gazebo/dupe:dupe",
        "//buck2/starlark-rust/starlark_map:starlark_map",
        # @oss-disable[end= ]: "//common/rust/shed/detect_eden:detect_eden",
        "//common/rust/shed/fbinit:fbinit",
        "//watchman/rust/watchman_client:watchman_client",
    ],
)
